﻿using And.Shp.Common.ServiceLocation;
using SharepointCommon;
using System;

namespace Uportal.Shp.Core.Services
{
    /// <summary>
    /// Project package with elevated properties
    /// </summary>
    public class ElevatedApp : AppPackage
    {
        public ElevatedApp(string webUrl)
        {
            var logger = SL.GetCurrent().GetInstance<ILogger>();
            try
            {
                Web = WebFactory.Elevated(webUrl);

                Settings = Settings.Get();

            }
            catch (Exception ex)
            {
                logger.Exception(ex);
                throw new Exception("Error while construct ApplicationPackage", ex);
            }
        }
    }
}
